package com.cloudkinto.vo.ft;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class FreightTempWeightAddReq {
    @ApiModelProperty("开始体积重")
    private Double startVolumeWeight;

    @ApiModelProperty("结束体积重")
    private Double endVolumeWeight;

    @ApiModelProperty("开始重量")
    private Double startWeight;

    @ApiModelProperty("结束重量")
    private Double endWeight;

    /**
     * 续重 0 总价 1续重价格
     */
    @ApiModelProperty("续重 0 总价 1续重价格 2单价")
    private Integer continueWeight;

    @ApiModelProperty("重量段价格")
    private List<FreightTempZonePriceAddReq> zonePriceList;

    public FreightTempWeightAddReq(Double startWeight, Double endWeight, Integer continueWeight) {
        this.startWeight = startWeight;
        this.endWeight = endWeight;
        this.continueWeight = continueWeight;
    }

    public FreightTempWeightAddReq(Double startVolumeWeight, Double endVolumeWeight, Double startWeight, Double endWeight, Integer continueWeight) {
        this.startVolumeWeight = startVolumeWeight;
        this.endVolumeWeight = endVolumeWeight;
        this.startWeight = startWeight;
        this.endWeight = endWeight;
        this.continueWeight = continueWeight;
    }

    public Double getEndVolumeWeight() {
        return endVolumeWeight == null ? 0d : endVolumeWeight;
    }

    public Double getEndWeight() {
        return endWeight == null ? 0d : endWeight;
    }
}
